﻿package com.gengine.core.frame
{
    import flash.events.*;
    import flash.utils.*;

    class MTimerFrame extends Frame
    {
        private var _timer:Timer;

        function MTimerFrame(param1:Number = 1)
        {
            super(param1);
            this._timer = new Timer(param1);
            return;
        }// end function

        override public function play() : void
        {
            super.play();
            this._timer.addEventListener(TimerEvent.TIMER, onEnterFrameHandler);
            this._timer.start();
            return;
        }// end function

        override public function stop() : void
        {
            super.stop();
            this._timer.stop();
            this._timer.removeEventListener(TimerEvent.TIMER, onEnterFrameHandler);
            return;
        }// end function

    }
}
